package grape.base.rest.client.dict;

import grape.base.service.dict.po.Dict;
import grape.common.service.trans.ITransService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by yangwei
 * Created at 2020/5/8
 */
@Component
@FeignClient(value = "grape-base")
public interface DictClient extends ITransService<String,String> {


    /**
     * 根据用户登录标识查询用户详情
     * @param type
     * @param key
     * @return
     */
    @GetMapping(value = "/dict/inner/trans")
    @Override
    public String trans(@RequestParam String type,@RequestParam String key);

    @GetMapping(value = "/dict/inner/trans/support")
    @Override
    public boolean support(@RequestParam String type);

    @GetMapping("/inner/getDictCodeById")
    public Dict getDictById(@RequestParam String id);

    @GetMapping("/inner/getDictCodeByCode")
    public Dict getDictByCode(@RequestParam String code);

}
